package com.tim.utils.common;

import java.util.Collection;

public final class CommonUtil {

	public static boolean isNull(Object ... objects) {
		return isNull(false, objects);
	}
	
	public static boolean isNull(boolean checkChildCollections, Object ... objects) {
		boolean flag = true;
		if(objects != null) {
			for(Object o : objects) {
				if(o != null) {
					if(checkChildCollections && (o instanceof Collection<?> || o instanceof Object[])) {
						return isNull(true, o);
					}
					else {
						flag = "".equals(o.toString().trim());
						if(flag) {
							break;
						}
					}
				}
			}
		}
		return flag;
	}
	
}
